﻿using Colorful.Furniture.IEntity;
using FreeSql.DataAnnotations;
using System;

namespace Colorful.Furniture.ErpSupplierManagement
{
    /// <summary>
    /// 供应商信息
    /// </summary>
    [Table(Name = "erp_supplier")]
    public class Supplier : AuditTenantSoftDeleteAggregateRoot
    {
        /// <summary>
		/// 供应商编码
		/// </summary>
		[Column(Name = "id", IsPrimary = true)]
        public Guid Id { get; set; }
        
        /// <summary>
        ///  供应商编号
        /// </summary>
        [Column(Name = "code", StringLength = 20)]
        public int? Code { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        [Column(Name = "name", StringLength = 100)]
        public string Name { get; set; }

        /// <summary>
        ///  供应商类别
        /// </summary>
        [Column(Name = "type")]
        public Guid? Type { get; set; }
        
        /// <summary>
        ///  备注
        /// </summary>
        [Column(Name = "remark", StringLength = 1200)]
        public string Remark { get; set; }

        /// <summary>
        /// 状态（0：禁用；1：启用）
        /// </summary>
        [Column(Name = "status")]
        public int? Status { get; set; }

        /// <summary>
        /// 本系统余额
        /// </summary>
        [Column(Name = "balance", Scale = 4, Precision = 16)]
        public decimal? Balance { get; set; }

        /// <summary>
        /// 上游授信额度
        /// </summary>
        [Column(Name = "credit_price", Scale = 4, Precision = 16)]
        public decimal? CreditPrice { get; set; }

        /// <summary>
        /// 上游系统余额
        /// </summary>
        [Column(Name = "price", Scale = 4, Precision = 16)]
        public decimal? Price { get; set; }

        /// <summary>
        /// 预警金额
        /// </summary>
        [Column(Name = "warning_price", Scale = 4, Precision = 16)]
        public decimal? WarningPrice { get; set; }

        /// <summary>
        ///  排序字段：值越大越靠前
        /// </summary>
        [Column(Name = "sort")]
        public long Sort { get; set; }

        /// <summary>
        ///  供应商key
        /// </summary>
        [Column(Name = "key", StringLength = 100)]
        public string Key { get; set; }

        /// <summary>
        ///  供应商secret
        /// </summary>
        [Column(Name = "secret", StringLength = 2000)]
        public string Secret { get; set; }

        /// <summary>
        ///  商户编号
        /// </summary>
        [Column(Name = "merchant_id", StringLength = 100)]
        public string MerchantId { get; set; }
        
        /// <summary>
        ///  后台地址
        /// </summary>
        [Column(Name = "manage_url", StringLength = 500)]
        public string ManageUrl { get; set; }

        /// <summary>
        ///  提单地址
        /// </summary>
        [Column(Name = "submit_order_url", StringLength = 500)]
        public string SubmitOrderUrl { get; set; }

        /// <summary>
        ///  查单地址
        /// </summary>
        [Column(Name = "search_order_url", StringLength = 500)]
        public string SearchOrderUrl { get; set; }

        /// <summary>
        ///  查余额地址
        /// </summary>
        [Column(Name = "search_account_url", StringLength = 500)]
        public string SearchAccountUrl { get; set; }




    }
}
